# This code is hosted on http://code.google.com/p/lenthorp/
# Freely available for use in applications, but should NOT be modified
# Email all comments to lenthorpresearch@gmail.com

from MonteCarloEngine_QLMod import *
import quantlib

class BasicEuropeanMonteCarloEngine_QL(MonteCarloEngine_QL): 

    engineFactory = { "mersenneinversenormal" : quantlib.MersenneInverseNormalEuropeanEngine
                   }
    
    def initialise(self, randomType, process,
                   processTimeSteps = 1, requiredTolerance = getNullReal(), seed = 42,
                   timestepsPerYear = getNullSize(), brownianBridge = False, antitheticVariate = False,
                   requiredSamples = getNullSize(), maxSamples = getNullSize()
                   ):
        requiredTolerance = 0.02
        self._underlyingEngine = BasicEuropeanMonteCarloEngine_QL.engineFactory[randomType](process, processTimeSteps, timestepsPerYear, brownianBridge, antitheticVariate, requiredSamples, requiredTolerance, maxSamples, seed)

